package body v8.Class_Try_Catch is


   function Re_Throw (this : in out Holder) return v8.Class_Value.Pointer is
      function Invoke (this : in out Try_Catch) return v8.Class_Value.Pointer;
      pragma Import (CPP, Invoke, "_ZN2v88TryCatch7ReThrowEv");
   begin
      return Invoke (this.Internal);
   end Re_Throw;
   pragma Inline (Re_Throw);

   function Get_Exception (this : Holder) return v8.Class_Value.Pointer is
      function Invoke (this : Try_Catch) return v8.Class_Value.Pointer;
      pragma Import (CPP, Invoke, "_ZNK2v88TryCatch9ExceptionEv");
   begin
      return Invoke (this.Internal);
   end Get_Exception;
   pragma Inline (Get_Exception);

   function Stack_Trace (this : Holder) return v8.Class_Stack_Trace.Pointer is
      function Invoke (this : Try_Catch) return v8.Class_Stack_Trace.Pointer;
      pragma Import (CPP, Invoke, "_ZNK2v88TryCatch10StackTraceEv");
   begin
      return Invoke (This.Internal);
   end Stack_Trace;
   pragma Inline (Stack_Trace);

   function Message (this : Holder) return v8.Class_Message.Pointer is
      function Invoke (this : Try_Catch) return v8.CLass_Message.Pointer;
      pragma Import (CPP, Invoke, "_ZNK2v88TryCatch7MessageEv");
   begin
      return Invoke (this.Internal);
   end Message;
   pragma Inline (Message);

   procedure Reset (this : in out Holder) is
      procedure Invoke (this : in out Try_Catch);
      pragma Import (CPP, Invoke, "_ZN2v88TryCatch5ResetEv");
   begin
      Invoke (this.Internal);
   end Reset;
   pragma Inline (Reset);


   ----------------
   -- Has_Caught --
   ----------------

   function Has_Caught (this : Holder) return Boolean is
      function Invoke (this : Try_Catch) return bool;  -- ../include/v8.h:3223
      pragma Import (CPP, Invoke, "_ZNK2v88TryCatch9HasCaughtEv");
   begin
      return -Invoke (this.Internal);
   end Has_Caught;
   pragma Inline (Has_Caught);

   ------------------
   -- Can_Continue --
   ------------------

   function Can_Continue (this : Holder) return Boolean is
      function Invoke (this : Try_Catch) return Bool;
      pragma Import (CPP, Invoke, "_ZNK2v88TryCatch11CanContinueEv");
   begin
      return -Invoke (this.Internal);
   end Can_Continue;
   pragma Inline (Can_Continue);

   -----------------
   -- Set_Verbose --
   -----------------

   procedure Set_Verbose (this : in out Holder; value : Boolean) is
      procedure Invoke (this : in out Try_Catch; value : bool);  -- ../include/v8.h:3291
      pragma Import (CPP, Invoke, "_ZN2v88TryCatch10SetVerboseEb");
   begin
      Invoke (this.Internal, -value);
   end Set_Verbose;
   pragma Inline (Set_Verbose);

   ------------------------
   -- Set_CaptureMessage --
   ------------------------

   procedure Set_CaptureMessage (this : in out Holder; value : Boolean) is
      procedure Invoke (this : in out Try_Catch; value : bool);  -- ../include/v8.h:3298
      pragma Import (CPP, Invoke, "_ZN2v88TryCatch17SetCaptureMessageEb");
   begin
      Invoke (this.Internal, -value);
   end Set_CaptureMessage;
   pragma Inline (Set_CaptureMessage);

   overriding procedure Initialize (this : in out Holder) is
   begin
      This.Reset;
   end Initialize;
   pragma Inline (Initialize);

   --------------
   -- Finalize --
   --------------

   overriding procedure Finalize (This : in out Holder) is
      procedure Destory (this : in out Try_Catch);  -- ../include/v8.h:3218
      pragma Import (CPP, Destory, "_ZN2v88TryCatchD1Ev");
   begin
      Destory (this.Internal);
   end Finalize;
   pragma Inline (Finalize);

   -------------------
   -- As_Try_Catch  --
   -------------------

   function As_Try_Catch (this : Holder) return Pointer is
   begin
      return this.Internal'Unrestricted_Access;
   end As_Try_Catch;
   pragma Inline (As_Try_Catch);

end v8.Class_Try_Catch;
